<template>
  <div>{{ test.name }}</div>
</template>
<script setup lang="ts">
import { watch } from 'vue'

interface Test {
  name: string
}
const props = defineProps<{
  test: Test
}>()

console.log('props', props)

watch(
  () => props.test,
  (newVal) => {
    console.log('newVal', newVal)
  },
  { deep: true }
)
</script>
